﻿@using Remotely.Server.Components 
@using Remotely.Server.Auth 
@inherits LayoutComponentBase

<AuthorizeView Policy="@TwoFactorRequiredRequirement.PolicyName">
    <Authorized>
            <div class="page">
                <div class="sidebar">
                    <NavMenu />
                </div>

                <div class="main">
                    <div class="content px-4">
                        @Body
                    </div>
                </div>

                <ToastHarness />

                <ModalHarness />
            </div>
    </Authorized>
    <NotAuthorized>
        <div class="container mt-5">
            <h3>Two-Factor Authentication Required</h3>

            <hr />
            <div class="row">
                <div class="col-sm-12">
                    <p>Two-factor authentication is required.  Click the button below to set up your authenticator app.</p>
                    <p>
                        <a href="/Identity/Account/Manage/TwoFactorAuthentication" class="btn btn-primary">Enable 2FA</a>
                    </p>
                </div>
            </div>
        </div>

    </NotAuthorized>
</AuthorizeView>
